package com.xiaoluo.a06_enum;

/**
 * @ Created on: 2020/6/17
 * @Author: LEGION XiaoLuo
 * @ Description:
 */
public enum ErrorCode {
    OK(0, "success"),
    ERROR_A(100, "error_a"),
    ERROR_B(200, "error_b");

    private int code;
    private String errorStr;

    ErrorCode(int code, String errorStr) {
        this.code = code;
        this.errorStr = errorStr;
    }

    public int getCode() {
        return code;
    }

    public String getErrorStr() {
        return errorStr;
    }

}
